// admin/router.js
'use strict';

app
  .run(
      function ($rootScope,   $state,   $stateParams) {
          $rootScope.$state = $state;
          $rootScope.$stateParams = $stateParams;        
      }
  )
.config(
      function ($stateProvider,   $urlRouterProvider) {
          $urlRouterProvider
              .otherwise('/app/dashboard');
          $stateProvider
              .state('app', {
                  abstract: true,
                  url: '/app',
                  templateUrl: 'admin/app.html',
              })
              .state('app.dashboard', {
                  url: '/dashboard',
                  templateUrl: 'admin/dashboard.html',
              })
      }
  )
  .config(
      function ($stateProvider,   $urlRouterProvider) {
          $stateProvider
              .state('app.imgs', {
                  url: '/imgs',
                  templateUrl: 'admin/classifiermodule/dashboard.html',
                  ncyBreadcrumb: {
                        label: '图片展示模块'
                  }
              })
              .state('app.imgs.listall', { //商机管理
                url: '/listall',
                templateUrl: 'admin/classifiermodule/listall.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '显示所有图片',
                }
            })
            .state('app.imgs.listCategory', {
                url: '/listcategory?Category',
                templateUrl: 'admin/classifiermodule/listcategory.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '查询类别',
                }
            })
            .state('app.imgs.highscore', {
                url: '/highscore',
                templateUrl: 'admin/classifiermodule/highscorepicture.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '高分图片',
                }
            })
            .state('app.imgs.similarpictures', {
                url: '/similarpictures',
                templateUrl: 'admin/classifiermodule/similarpictures.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '相似图片',
                }
            })
            .state('app.imgs.timeaxislist', {
                url: '/timeaxislist',
                templateUrl: 'admin/classifiermodule/timeaxislist.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '时光轴',
                }
            })
            .state('app.imgs.ImgDetailed', {
                url: '/ImgDetailed',
                templateUrl: 'admin/classifiermodule/ImgDetailed.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '图片详细信息',
                }
            })
            .state('app.imgs.styletransfer', {
                url: '/styletransfer',
                templateUrl: 'admin/classifiermodule/styletransfer.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '艺术风格迁移',
                }
            })
            .state('app.imgs.searchface', {
                url: '/searchface',
                templateUrl: 'admin/classifiermodule/searchface.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '人脸搜索',
                }
            })
            .state('app.imgs.AgeGender', {
                url: '/AgeGender',
                templateUrl: 'admin/classifiermodule/AgeGender.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '性别年龄预测',
                }
            })
            .state('app.imgs.Smile', {
                url: '/Smile',
                templateUrl: 'admin/classifiermodule/Smile.html',
                resolve: {
                deps: ['$ocLazyLoad',
                    function ($ocLazyLoad) {
                        return $ocLazyLoad.load('admin/classifiermodule/controller.js');
                    }]
                },
                ncyBreadcrumb: {
                    parent: 'app.imgs',
                    label: '笑脸检测',
                }
            })
      }
  );